xl: Return proper error codes for block-attach and block-detach
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 12 Nov 2014 17:31:33 +0000 (17:31 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 25 Nov 2014 14:04:04 +0000 (14:04 +0000)
commit47c6e7f28ddc27f194c7c4902ea3163ba582b582
tree3f7f16d55462139997f09bc753f63f41b8087a74
parent28b4baacd599e8c10e6dac055f6a939bb730fb8a
xl: Return proper error codes for block-attach and block-detach

Return proper error codes on failure so that scripts can tell whether
the command completed properly or not.

This is not a proper fix, since it fails to call
libxl_device_disk_dispose() on the error path.  But a proper fix
requires some refactoring, so given where we are in the release
process, it's better to have a fix that is simple and obvious, and do
the refactoring once the next development window opens up.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/xl_cmdimpl.c